import request from "@/api/request"
import type { AxiosResponse } from "axios"

// get
export type GetChannelParams = {
  channel: number | string,
  wd_way: number | string,
  page: number,
  page_size: number
}
export function getChannel(params: GetChannelParams):Promise<AxiosResponse>{
  return request('withdraw/query_withdraw_way_config', params, 'post')
}

// create
export type CreateChannelParams = {
  channel: string,
  wd_way: string,
  status: number
}
export function createChannel(params: CreateChannelParams):Promise<AxiosResponse>{
  return request('withdraw/create_withdraw_way_config', params, 'post')
}

// update
export type UpdateChannelParams = {
  conf_id: number,
  channel: string,
  wd_way: string,
  status: number
}
export function updateChannel(params: UpdateChannelParams):Promise<AxiosResponse>{
  return request('withdraw/update_withdraw_way_config', params, 'post')
}